Skip to content

feat(frontend): Add Near Intents terms of service to swap review#12293

Merged
AntonioVentilii merged 3 commits intomainfrom
feat-frontend/Add-Near-Intents-terms-of-service-to-swap-review
Apr 2, 2026
Merged

feat(frontend): Add Near Intents terms of service to swap review#12293
AntonioVentilii merged 3 commits intomainfrom
feat-frontend/Add-Near-Intents-terms-of-service-to-swap-review

Conversation

@AntonioVentilii
Copy link
Copy Markdown
Collaborator

@AntonioVentilii AntonioVentilii commented Apr 2, 2026

Motivation

Near Intents require that we make the users acknowledge their terms of service for the 1click API. As per our legal team approval, we create an info box, before the last review step, to warn the user.

In the next iteration, we will save this acknowledgment in the backend, so that we can persist it, and avoid showing it again, if already acknowledged the current version.

Screenshot 2026-04-02 at 10 58 16

@AntonioVentilii AntonioVentilii marked this pull request as ready for review April 2, 2026 08:58
@AntonioVentilii AntonioVentilii requested a review from a team as a code owner April 2, 2026 08:58
Copilot AI review requested due to automatic review settings April 2, 2026 08:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a NEAR Intents Terms of Service acknowledgement notice to the swap review UI when the selected swap provider is NEAR Intents, to satisfy 1Click API ToS acknowledgement requirements.

Changes:

  • Add a new i18n string (swap.text.near_intents_tos) and type definition for it.
  • Introduce a NEAR_INTENTS_TOS_LINK constant and a new SwapNearIntentsTos info-box component.
  • Render the ToS info box conditionally in SwapReview when NEAR Intents is the selected provider (and the feature is enabled).

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/frontend/src/lib/types/i18n.d.ts Extends swap i18n type with near_intents_tos.
src/frontend/src/lib/i18n/en.json Adds English ToS disclaimer text with link placeholder.
src/frontend/src/lib/constants/swap.constants.ts Adds a constant for the NEAR Intents ToS URL.
src/frontend/src/lib/components/swap/SwapReview.svelte Conditionally shows the NEAR Intents ToS info box on the review step.
src/frontend/src/lib/components/swap/SwapNearIntentsTos.svelte New MessageBox component rendering the ToS text as HTML with a link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/frontend/src/lib/i18n/en.json
Comment thread src/frontend/src/lib/i18n/en.json
Comment thread src/frontend/src/lib/components/swap/SwapReview.svelte
@AntonioVentilii AntonioVentilii added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 343692b Apr 2, 2026
81 checks passed
@AntonioVentilii AntonioVentilii deleted the feat-frontend/Add-Near-Intents-terms-of-service-to-swap-review branch April 2, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants